<template>
  <div>
    <!-- top区域 -->
    <van-nav-bar
      title="发布房源"
      left-text="返回"
      right-text="按钮"
      left-arrow
      @click-left="$router.go(-1)"
    />

    <div class="box">
      <p>房源信息</p>
    </div>

    <!-- 房源信息 -->
    <van-field
      label="小区名称"
      click-right-icon="fn"
      readonly
      class="inputkuang"
    >
      <template #right-icon>
        <div class="aa">
          <p>请输入小区名称</p>
          <van-icon name="arrow" />
        </div>
        <!-- <span>请输入小区名称</span> -->
      </template>
    </van-field>

    <van-field
      label="租 金"
      click-right-icon="fn"
      placeholder="请输入租金"
      class="inputkuang"
    >
      <template #right-icon>
        <div class="aa">
          <p>￥/ 月</p>
        </div>
        <!-- <span>请输入小区名称</span> -->
      </template>
    </van-field>

    <van-field
      label="建筑面积"
      click-right-icon="fn"
      placeholder="请输入建筑面积"
      class="inputkuang"
    >
      <template #right-icon>
        <div class="aa">
          <p>m^</p>
        </div>
        <!-- <span>请输入小区名称</span> -->
      </template>
    </van-field>

    <van-field label="户 型" click-right-icon="fn" readonly class="inputkuang">
      <template #right-icon>
        <div class="aa">
          <p>请选择</p>
          <van-icon name="arrow" />
        </div>
        <!-- <span>请输入小区名称</span> -->
      </template>
    </van-field>

    <van-field
      label="所在楼层"
      click-right-icon="fn"
      readonly
      class="inputkuang"
    >
      <template #right-icon>
        <div class="aa">
          <p>请选择</p>
          <van-icon name="arrow" />
        </div>
        <!-- <span>请输入小区名称</span> -->
      </template>
    </van-field>
    <van-field label="朝 向" click-right-icon="fn" readonly class="inputkuang">
      <template #right-icon>
        <div class="aa">
          <p>请选择</p>
          <van-icon name="arrow" />
        </div>
        <!-- <span>请输入小区名称</span> -->
      </template>
    </van-field>

    <div class="box tite">
      <p>房屋标题</p>
    </div>

      <van-field
        v-model="value"
        placeholder="请输入标题（例如：整租 小区名 2室 5000元）"
        type="textarea "
      />
      <p class="tutu">房屋图像</p>


    <van-uploader :after-read="afterRead" class="shangchuan" />

   <div class="box tite lie">
      <p>房屋配置</p>
    </div>
  </div>
</template>

<script>
export default {
  name: 'Fangyuan',
  props: {},

  data () {
    return {
      tel: '',
      text: '',
      digit: '',
      number: '',
      password: '',
      sms: '',
      value:''
    }
  },
  methods: {
    fn () {
      console.log(1)
    },
     afterRead(file) {
      // 此时可以自行将文件上传至服务器
      console.log(file);
    },
  }
}
</script>

<style scoped lang="less">
.shangchuan {
  margin: 8px 0 0 6px ;
}
.tutu {
   margin-left: 16px;
   margin-top: 10px;
   padding-bottom: 8px;
   border-bottom: 1px solid #f7f1f1;
}
 
.tite.box {
  color: #000;
  font-size: 14px;
  border-bottom: 1px solid #f7f1f1;
}
.aa {
  display: flex;
  p {
    color: #93908e;
    margin-right: 5px;
  }
}

.inputkuang {
  border-top: 1px solid #f7f1f1;
}
.box {
  height: 50px;
  color: #21b97a;
  font-size: 18px;
  // font-weight:700;
  p {
    height: 50px;
    line-height: 50px;
    margin-left: 16px;
  }
}
.line {
  height: 1px;
  background-color: #ccc;
}
</style>
